<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./../template/common.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core">

    <ui:define name="title">
        Event edit
    </ui:define>

    <ui:define name="head">
        <script>
            function change() {
//                alert("c");
                var t = $(".datepicker");
                alert(t.val());
                t.datepicker.datepicker({
                    showOn: "button",
                    buttonImage: "images/calendar.gif",
                    buttonImageOnly: true
                });
            }
            ;
            $(".datepicker").datepicker({
                showOn: "button",
                buttonImage: "images/calendar.gif",
                buttonImageOnly: true
            });

        </script>
        <script type="text/javascript">
            $('.datepicker').pickadate()
               
        </script>
        <script src="../../resources/js/jsDatePick.min.1.3.js" type="text/javascript" />
        <link id="theme_base" href="../../resources/css/pickadate/themes/default.css" rel="stylesheet" />
        <link id="theme_date" href="../../resources/css/pickadate//themes/default.date.css" rel="stylesheet" />
        <link id="theme_time" href="../../resources/css/pickadate//themes/default.time.css" rel="stylesheet" />
    </ui:define>

    <ui:define name="pageheader">
        Event edit
    </ui:define>

    <ui:define name="content">
        <h:form >
            <table border="0" cellpadding="0" cellspacing="0"  id="id-form">
                <tr>
                    <th valign="top">Name:</th>
                    <!--<td><input type="text" class="inp-form-error" /></td>-->
                    <td>
                        <h:inputText value="#{eventManager.currEvent.name}" styleClass="inp-form" />
                        <h:inputHidden value="#{eventManager.currEvent.eventId}"  />
                    </td>

                </tr>

                <tr>
                    <th valign="top">Place:</th>
                    <!--<td><input type="text" class="inp-form-error" /></td>-->
                    <td>
                        <h:inputText value="#{eventManager.currEvent.place}" styleClass="inp-form" />
                    </td>

                </tr>
                <tr>
                    <th valign="top">Start date</th>
                    <!--<td><input type="text" class="inp-form-error" /></td>-->
                    <td>
                        <h:inputText  value="#{eventManager.currEvent.startDate}" styleClass="inp-form datepicker" />
                    </td>

                </tr>
                <tr>
                    <th valign="top">End date</th>
                    <td>
                        <h:inputText   value="#{eventManager.stEndDate}" styleClass="inp-form" />
                    </td>

                </tr>
                <tr>
                    <th valign="top">Description</th>
                    <td>
                        <h:inputText   value="#{eventManager.currEvent.description }" styleClass="inp-form" />
                    </td>

                </tr>
                <tr>
                    <th>&nbsp;</th>
                    <td valign="top">
                        <!--styleClass="form-submit"-->
                        <h:commandButton value="Submit" action="#{eventManager.doupdate()}" styleClass="form-submit"  />
                        <input type="reset" value="" class="form-reset"  />
                    </td>
                    <td></td>
                </tr>

            </table>
        </h:form>
    </ui:define>

</ui:composition>
